package com.ty.skysystem.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ty.common.validator.group.SaveGroup;
import com.ty.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 车队信息表：用于存放和管理车队信息
 *
 * @author tianyuzhu
 * @email 1659770218@QQ.COM
 * @date 2020-12-11 11:12:37
 */
@Data
@TableName("truck_team")
@ApiModel(value = "车队信息实体类")
public class TruckTeamEntity implements Serializable {

  /** 车队编号（自增） */
  @Null(
      message = "新增时不能携带车队ID",
      groups = {SaveGroup.class})
  @NotNull(
      message = "修改时车队ID不能为空",
      groups = {UpdateGroup.class})
  @ApiModelProperty(value = "车队ID-主键")
  @TableId(value = "team_id", type = IdType.AUTO)
  private Long teamId;
  /** 车队名称 */
  @NotBlank(
      message = "车队名称不能为空",
      groups = {SaveGroup.class})
  @ApiModelProperty(value = "车队名称")
  private String teamName;
  /** 车队负责人 */
  @NotBlank(
      message = "车队负责人不能为空",
      groups = {SaveGroup.class})
  @ApiModelProperty(value = "车队负责人")
  private String leader;
  /** 备注 */
  @ApiModelProperty(value = "备注")
  private String remark;
  /** 1 表示删除， 0 表示未删除 */
  @TableLogic
  @ApiModelProperty(value = "逻辑删除: 1 表示删除， 0 表示未删除")
  @JsonInclude(JsonInclude.Include.NON_NULL)
  private Integer isDeleted;
  /** 创建时间 */
  @ApiModelProperty(value = "创建时间")
  private Date createTime;
  /** 修改时间 */
  @ApiModelProperty(value = "修改时间")
  private Date updateTime;

  /** 车队运力 */
  @TableField(exist = false)
  @JsonInclude(JsonInclude.Include.NON_NULL)
  private Integer comprehensiveTonnage;
}
